package ljye.com.ljye;

import android.app.Application;

import okhttp3.OkHttpClient;

/**
 * Created by Administrator on 2017/1/5.
 */

public class App extends Application {
    public static final OkHttpClient client = new OkHttpClient.Builder()
//            .connectTimeout(3, TimeUnit.SECONDS)//超时时间
            .retryOnConnectionFailure(true)//断线重连
            .build();
//    //设置超时
//    connectTimeout(15, TimeUnit.SECONDS);
//    readTimeout(20, TimeUnit.SECONDS);
//    writeTimeout(20, TimeUnit.SECONDS);
//    //错误重连
//    retryOnConnectionFailure(true);

    private  String token;
    public App() {
        super();
    }
    public App(String token) {
        this.token = token;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public void onCreate() {
        super.onCreate();

    }
}
